package com.wit.po;

import java.util.Date;

/**
 * Wage entity. @author MyEclipse Persistence Tools
 */

public class Wage implements java.io.Serializable {

	// Fields
	
	public final static int []DirectDepartFypBoundaries = {1000000,800000};
	public final static int []DirectGroupFypBoundaries = {40000,30000,20000,10000};
	public final static int []IndirectGroupFypBoundaries = {80000,50000,30000};
	

	private Integer wageId;
	private Employeeaddition employeeaddition;
	private Employee employee;
	private Boolean wageState;
	private Double wageDeserved;
	private Double wageActual;
	private Date payDate;
	private Date standardDate;
	private Double fyc;
	private Double ryc;
	private Double monthlyAward;
	private Double quarterlyAward;
	private Double annualAward;
	private Double zyAllowance;
	private Double dallowance;
	private Double qgAllowance;
	private Double ycAllowance;
	private Double qycAllowance;
	private Double annualDividend;

	// Constructors

	/** default constructor */
	public Wage() {
	}

	/** full constructor */
	public Wage(Employeeaddition employeeaddition, Employee employee,
			Boolean wageState, Double wageDeserved, Double wageActual,
			Date payDate, Date standardDate, Double fyc, Double ryc,
			Double monthlyAward, Double quarterlyAward, Double annualAward,
			Double zyAllowance, Double dallowance, Double qgAllowance,
			Double ycAllowance, Double qycAllowance, Double annualDividend) {
		this.employeeaddition = employeeaddition;
		this.employee = employee;
		this.wageState = wageState;
		this.wageDeserved = wageDeserved;
		this.wageActual = wageActual;
		this.payDate = payDate;
		this.standardDate = standardDate;
		this.fyc = fyc;
		this.ryc = ryc;
		this.monthlyAward = monthlyAward;
		this.quarterlyAward = quarterlyAward;
		this.annualAward = annualAward;
		this.zyAllowance = zyAllowance;
		this.dallowance = dallowance;
		this.qgAllowance = qgAllowance;
		this.ycAllowance = ycAllowance;
		this.qycAllowance = qycAllowance;
		this.annualDividend = annualDividend;
	}

	public void check()
	{
		Double total = 0.0;
		if(getFyc() != null && getFyc() > 0)
			total += getFyc();
		else	fyc = 0.0;
		if(getRyc() != null && getRyc() > 0)
			total += getRyc();
		else	ryc = 0.0;
		if(getMonthlyAward() != null && getMonthlyAward() > 0)
			total += getMonthlyAward();
		else	monthlyAward = 0.0;
		if(getQuarterlyAward() != null && getQuarterlyAward() > 0)
			total += getQuarterlyAward();
		else	quarterlyAward = 0.0;
		if(getAnnualAward() != null && getAnnualAward() > 0)
			total += getAnnualAward();
		else	annualAward = 0.0;
		if(getZyAllowance() != null && getZyAllowance() > 0)
			total += getZyAllowance();
		else	zyAllowance = 0.0;
		if(getDallowance() != null && getDallowance() > 0)
			total += getDallowance();
		else	dallowance = 0.0;
		if(getQgAllowance() != null && getQgAllowance() > 0)
			total += getQgAllowance();
		else	qgAllowance = 0.0;
		if(getYcAllowance() != null && getYcAllowance() > 0)
			total += getYcAllowance();
		else	ycAllowance = 0.0;
		if(getQycAllowance() != null && getQycAllowance() > 0)
			total += getQycAllowance();
		else	qycAllowance = 0.0;
		if(getAnnualDividend() != null && getAnnualDividend() > 0)
			total += getAnnualDividend();
		else	annualDividend = 0.0;
		
		wageDeserved = total;
		
		if(wageState == null)
			wageState = false;
		if(wageActual == null)
			wageActual = 0.0;
	}
	
	// Property accessors

	public Integer getWageId() {
		return this.wageId;
	}

	public void setWageId(Integer wageId) {
		this.wageId = wageId;
	}

	public Employeeaddition getEmployeeaddition() {
		return this.employeeaddition;
	}

	public void setEmployeeaddition(Employeeaddition employeeaddition) {
		this.employeeaddition = employeeaddition;
	}

	public Employee getEmployee() {
		return this.employee;
	}

	public void setEmployee(Employee employee) {
		this.employee = employee;
	}

	public Boolean getWageState() {
		return this.wageState;
	}

	public void setWageState(Boolean wageState) {
		this.wageState = wageState;
	}

	public Double getWageDeserved() {
		return this.wageDeserved;
	}

	public void setWageDeserved(Double wageDeserved) {
		this.wageDeserved = wageDeserved;
	}

	public Double getWageActual() {
		return this.wageActual;
	}

	public void setWageActual(Double wageActual) {
		this.wageActual = wageActual;
	}

	public Date getPayDate() {
		return this.payDate;
	}

	public void setPayDate(Date payDate) {
		this.payDate = payDate;
	}

	public Date getStandardDate() {
		return this.standardDate;
	}

	public void setStandardDate(Date standardDate) {
		this.standardDate = standardDate;
	}

	public Double getFyc() {
		return this.fyc;
	}

	public void setFyc(Double fyc) {
		this.fyc = fyc;
	}

	public Double getRyc() {
		return this.ryc;
	}

	public void setRyc(Double ryc) {
		this.ryc = ryc;
	}

	public Double getMonthlyAward() {
		return this.monthlyAward;
	}

	public void setMonthlyAward(Double monthlyAward) {
		this.monthlyAward = monthlyAward;
	}

	public Double getQuarterlyAward() {
		return this.quarterlyAward;
	}

	public void setQuarterlyAward(Double quarterlyAward) {
		this.quarterlyAward = quarterlyAward;
	}

	public Double getAnnualAward() {
		return this.annualAward;
	}

	public void setAnnualAward(Double annualAward) {
		this.annualAward = annualAward;
	}

	public Double getZyAllowance() {
		return this.zyAllowance;
	}

	public void setZyAllowance(Double zyAllowance) {
		this.zyAllowance = zyAllowance;
	}

	public Double getDallowance() {
		return this.dallowance;
	}

	public void setDallowance(Double dallowance) {
		this.dallowance = dallowance;
	}

	public Double getQgAllowance() {
		return this.qgAllowance;
	}

	public void setQgAllowance(Double qgAllowance) {
		this.qgAllowance = qgAllowance;
	}

	public Double getYcAllowance() {
		return this.ycAllowance;
	}

	public void setYcAllowance(Double ycAllowance) {
		this.ycAllowance = ycAllowance;
	}

	public Double getQycAllowance() {
		return this.qycAllowance;
	}

	public void setQycAllowance(Double qycAllowance) {
		this.qycAllowance = qycAllowance;
	}

	public Double getAnnualDividend() {
		return this.annualDividend;
	}

	public void setAnnualDividend(Double annualDividend) {
		this.annualDividend = annualDividend;
	}

}